import axiosServer from '../utils/request'
//添加商品
export const GoodsAdd = (formData) => {
    return axiosServer({
      method: 'post',
      url: '/api/goods/add',
      data: formData,
    })
  }
//商品列表
export const GoodsList = () => {
    return axiosServer({
      method: 'get',
      url: '/api/goods/list',
    })
  }
  //删除商品
export const GoodsDelete = (id) => {
    return axiosServer({
      method: 'get',
      url: '/api/goods/delete',
      params: { id },
    })
  }
  //编辑商品
  export const GoodsEdit=(_id,shop,price,oldprice,detail,categoryname,issell,roomnum)=>{
    return axiosServer({
      method: 'post',
      url: '/api/goods/modify',
      data:{_id,shop,price,oldprice,detail,categoryname,issell,roomnum},
    })
  }